Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(metrics): clean & restructure some metrics #13195

Merged
merged 3 commits into from
Nov 2, 2023
Merged

Conversation

fuyufjh
Copy link
Member

@fuyufjh fuyufjh commented Nov 1, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Restructured some metrics.

Removed: (because these metrics were not generated anywhere)

  • Actor Barrier Latency
  • Actor Processing Time

Moved:

  • Actor Execution Time

Dedup: can be substituted by

panels.timeseries_percentage(
"Executor Cache Miss Ratio",
"",
[
panels.target(
f"(sum(rate({metric('stream_join_lookup_miss_count')}[$__rate_interval])) by (side, join_table_id, degree_table_id, actor_id) ) / (sum(rate({metric('stream_join_lookup_total_count')}[$__rate_interval])) by (side, join_table_id, degree_table_id, actor_id))",
"join executor cache miss ratio - - {{side}} side, join_table_id {{join_table_id}} degree_table_id {{degree_table_id}} actor {{actor_id}}",
),
panels.target(
f"(sum(rate({metric('stream_agg_lookup_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_agg_lookup_total_count')}[$__rate_interval])) by (table_id, actor_id))",
"Agg cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
panels.target(
f"(sum(rate({metric('stream_agg_distinct_cache_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_agg_distinct_total_cache_count')}[$__rate_interval])) by (table_id, actor_id))",
"Distinct agg cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
panels.target(
f"(sum(rate({metric('stream_group_top_n_cache_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_group_top_n_total_query_cache_count')}[$__rate_interval])) by (table_id, actor_id))",
"Stream group top n cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
panels.target(
f"(sum(rate({metric('stream_group_top_n_appendonly_cache_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_group_top_n_appendonly_total_query_cache_count')}[$__rate_interval])) by (table_id, actor_id))",
"Stream group top n appendonly cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
panels.target(
f"(sum(rate({metric('stream_lookup_cache_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_lookup_total_query_cache_count')}[$__rate_interval])) by (table_id, actor_id))",
"Stream lookup cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
panels.target(
f"(sum(rate({metric('stream_temporal_join_cache_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_temporal_join_total_query_cache_count')}[$__rate_interval])) by (table_id, actor_id))",
"Stream temporal join cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
panels.target(
f"1 - (sum(rate({metric('stream_materialize_cache_hit_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_materialize_cache_total_count')}[$__rate_interval])) by (table_id, actor_id))",
"materialize executor cache miss ratio - table {{table_id}} actor {{actor_id}} {{instance}}",
),
panels.target(
f"(sum(rate({metric('stream_over_window_cache_miss_count')}[$__rate_interval])) by (table_id, actor_id) ) / (sum(rate({metric('stream_over_window_cache_lookup_count')}[$__rate_interval])) by (table_id, actor_id))",
"Over window cache miss ratio - table {{table_id}} actor {{actor_id}} ",
),
],
),

  • Join Executor Cache
  • Aggregation Executor Cache Statistics For Each Key/State

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@fuyufjh fuyufjh requested review from stdrc and hzxa21 November 2, 2023 06:38
Copy link
Member

@stdrc stdrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@wcy-fdu wcy-fdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fuyufjh fuyufjh enabled auto-merge November 2, 2023 06:42
@fuyufjh fuyufjh added this pull request to the merge queue Nov 2, 2023
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #13195 (fd3956d) into main (fdfbf53) will increase coverage by 0.00%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main   #13195   +/-   ##
=======================================
  Coverage   68.08%   68.08%           
=======================================
  Files        1512     1512           
  Lines      256245   256245           
=======================================
+ Hits       174452   174459    +7     
+ Misses      81793    81786    -7     
Flag Coverage Δ
rust 68.08% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/stream/src/executor/monitor/streaming_stats.rs 95.69% <100.00%> (ø)

... and 11 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 2, 2023
@fuyufjh fuyufjh added this pull request to the merge queue Nov 2, 2023
Merged via the queue into main with commit 1211f9d Nov 2, 2023
6 of 7 checks passed
@fuyufjh fuyufjh deleted the eric/clean_metrics branch November 2, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants